<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- CSRF Token -->
    <meta name="csrf-token" content="{{ csrf_token() }}">

    <title>@yield('title', config('app.name'))</title>

    <link rel="stylesheet" href="{{ asset('css/base.css?'.time()) }}">
    <link rel="stylesheet" href="{{ asset('css/default.css?'.time()) }}">
    <link rel="stylesheet" href="{{ asset('css/pnotify.custom.min.css?'.time()) }}">
    <link rel="stylesheet" href="{{ asset('css/comment.css?'.time()) }}">
    <link rel="stylesheet" href="{{ asset('css/dialog_box.css?'.time()) }}">
    <link rel="stylesheet" href="{{ asset('js/need/laydate.css?'.time()) }}">
    <link rel="stylesheet" href="{{ asset('css/pager.css?'.time()) }}">
    <script src="{{ asset('js/jquery-3.2.0.min.js?'.time()) }}"></script>
    <script src="{{ asset('js/pnotify.custom.min.js?'.time()) }}"></script>
    <script src="{{ asset('js/jquery.form.min.js?'.time()) }}"></script>
    <script type="text/javascript">
        $.ajaxSetup({headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')}});
        var urlArr = window.location.pathname.split('/');
        var url = '/'+urlArr[1];
        if(url.substr(url.length - 1) != 's'){
            url = url + 's';
        }

        var params = new Object();
        $(function(){
            $('.menu').find('.'+url.slice(1)).addClass('active').siblings().removeClass('active');
        });
        function getList(url,param) {
        	param = typeof param !== 'undefined' ? $.param(param) : '';
            $.ajax({
                type: 'get',
                url: url + '/list?' + param,
                dataType: 'html',
                success: function(data){
                    $('#list').html(data)
                }
            });
        }

        var box = new Object();
        var notifyType = ['error','success','info'];
        box.tipHover = function(data) {
            // art.dialog.tipHover(data);
            new PNotify({type:notifyType[data.status],text:data.msg,delay:2000});
        }
    </script>
    @yield('styles')
</head>
<body>
    <div class="page_content">
        @include('particals.navbar')

        <div class="list_content">
            @yield('content')
        </div>
    </div>

    <script src="{{ asset('js/common.js?'.time()) }}"></script>
    <script src="{{ asset('js/artDialog.min.js?'.time()) }}"></script>
    <script src="{{ asset('js/laydate.js?'.time()) }}"></script>
    <script src="{{ asset('js/pager.js?'.time()) }}"></script>
    <script src="{{ asset('js/dialog_box.js?'.time()) }}"></script>
    @yield('scripts')
</body>
</html>
